package com.lengchangjing.BehavioralPatterns.MediatorPattern;

public class ConcreteMdeiator implements Mediator {
    private ConcreteColleagueA concreteColleagueA;
    private ConcreteColleagueB concreteColleagueB;
    private ConcreteColleagueC concreteColleagueC;

    public ConcreteMdeiator(ConcreteColleagueA concreteColleagueA, ConcreteColleagueB concreteColleagueB, ConcreteColleagueC concreteColleagueC) {
        this.concreteColleagueA = concreteColleagueA;
        this.concreteColleagueB = concreteColleagueB;
        this.concreteColleagueC = concreteColleagueC;
    }


    @Override
    public void cook() {
        concreteColleagueA.cook();
        concreteColleagueB.cook();
        concreteColleagueC.cook();
    }

    @Override
    public void wash() {
        concreteColleagueA.wash();
        concreteColleagueB.wash();
        concreteColleagueC.wash();
    }

    @Override
    public void clean() {
        concreteColleagueA.clean();
        concreteColleagueB.clean();
        concreteColleagueC.clean();
    }
}
